package com.define.ssh.model;

import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * GroupmemberRegular entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "groupmember_regular")
public class GroupmemberRegular implements java.io.Serializable {

	// Fields

	private String groupid;
	private Integer userid;
	private GroupinfoRegular groupinfoRegular;
	private Date updateTime;
	private Integer updatetype;
	private Integer pushflag;
	private Integer isadmin;
	
	private UserInfo userInfo;
	
	private Integer forbidden;// 1表示禁用 0启用

	// Constructors

	/** default constructor */
	public GroupmemberRegular() {
	}

	
	
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "userid", unique = false, nullable = false, insertable = false, updatable = false)
	public UserInfo getUserInfo() {
		return userInfo;
	}


	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}
	
	@Id
	@Column(name = "groupid", unique = true, nullable = false, insertable = true, updatable = true, length = 20)
	public String getGroupid() {
		return groupid;
	}
	
	public void setGroupid(String groupid) {
		this.groupid = groupid;
	}

	@Id
	@Column(name = "userid", unique = true, nullable = false, insertable = true, updatable = true)
	public Integer getUserid() {
		return userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}





	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "groupid", unique = false, nullable = false, insertable = false, updatable = false)
	public GroupinfoRegular getGroupinfoRegular() {
		return this.groupinfoRegular;
	}

	public void setGroupinfoRegular(GroupinfoRegular groupinfoRegular) {
		this.groupinfoRegular = groupinfoRegular;
	}

	@Column(name = "update_time")
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "updatetype", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getUpdatetype() {
		return this.updatetype;
	}

	public void setUpdatetype(Integer updatetype) {
		this.updatetype = updatetype;
	}

	@Column(name = "pushflag", unique = false, nullable = true, insertable = true, updatable = true)
	public Integer getPushflag() {
		return this.pushflag;
	}

	public void setPushflag(Integer pushflag) {
		this.pushflag = pushflag;
	}

	@Column(name = "isadmin", unique = false, nullable = true, insertable = true, updatable = true)
	public Integer getIsadmin() {
		return this.isadmin;
	}

	public void setIsadmin(Integer isadmin) {
		this.isadmin = isadmin;
	}


	@Column(name = "forbidden", unique = false, nullable = true, insertable = true, updatable = true)
	public Integer getForbidden() {
		return forbidden;
	}

	public void setForbidden(Integer forbidden) {
		this.forbidden = forbidden;
	}

	
}